package com.tao.common.validator.annotation;

import com.tao.common.validator.validator.ListvalueConstraintValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author 86187
 */
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
// 设置校验器, 就是将这个校验注解和校验器关联起来
@Constraint(
		validatedBy = {ListvalueConstraintValidator.class}
)
public @interface ListValue {
	String message() default "{com.tao.common.validator.annotation.ListValue.message}";

	Class<?>[] groups() default {};

	Class<? extends Payload>[] payload() default {};

	int[] vals() default {};

}
